<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: Server类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-static-methods">静态 Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="class_server-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Server类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_server_8h_source.html">Server.h</a>&gt;</code></p>
<div class="dynheader">
类 Server 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_server.png" usemap="#Server_map" alt=""/>
  <map id="Server_map" name="Server_map">
<area href="class_service.html" title="服务基类" alt="Service" shape="rect" coords="0,0,56,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a64c508254f64bafca731b8758332bb04"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a64c508254f64bafca731b8758332bb04">Server</a> ()</td></tr>
<tr class="separator:a64c508254f64bafca731b8758332bb04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b3aa2579cb1c8cd1d069582c14d0fa6"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a4b3aa2579cb1c8cd1d069582c14d0fa6">~Server</a> ()</td></tr>
<tr class="separator:a4b3aa2579cb1c8cd1d069582c14d0fa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06de0cc7252d197cbf6f1fdb6887d6c1"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a06de0cc7252d197cbf6f1fdb6887d6c1">Init</a> (const <a class="el" href="class_tcp_config.html">TcpConfig</a> &amp;c)</td></tr>
<tr class="memdesc:a06de0cc7252d197cbf6f1fdb6887d6c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化服务,主要用于绑定监听一个地址端口  <a href="class_server.html#a06de0cc7252d197cbf6f1fdb6887d6c1">更多...</a><br /></td></tr>
<tr class="separator:a06de0cc7252d197cbf6f1fdb6887d6c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c31d308dd9b23132e9912352696ac26"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a7c31d308dd9b23132e9912352696ac26">Run</a> ()</td></tr>
<tr class="memdesc:a7c31d308dd9b23132e9912352696ac26"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行服务  <a href="class_server.html#a7c31d308dd9b23132e9912352696ac26">更多...</a><br /></td></tr>
<tr class="separator:a7c31d308dd9b23132e9912352696ac26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2370cd5731a2c120dc705af3acbe46b8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a2370cd5731a2c120dc705af3acbe46b8">NotifyExit</a> ()</td></tr>
<tr class="memdesc:a2370cd5731a2c120dc705af3acbe46b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知Run函数退出  <a href="class_server.html#a2370cd5731a2c120dc705af3acbe46b8">更多...</a><br /></td></tr>
<tr class="separator:a2370cd5731a2c120dc705af3acbe46b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3513ac8eb75dac27c81720b64aa9b761"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a3513ac8eb75dac27c81720b64aa9b761">PostConnect</a> (void *invoker=<a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>, const char *addr=<a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>, <a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> port=0)</td></tr>
<tr class="memdesc:a3513ac8eb75dac27c81720b64aa9b761"><td class="mdescLeft">&#160;</td><td class="mdescRight">投递一个接收请求，参数将会被忽略  <a href="class_server.html#a3513ac8eb75dac27c81720b64aa9b761">更多...</a><br /></td></tr>
<tr class="separator:a3513ac8eb75dac27c81720b64aa9b761"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97d9351a4f3b94d46bc353246c95123b"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a97d9351a4f3b94d46bc353246c95123b">GetName</a> () const</td></tr>
<tr class="memdesc:a97d9351a4f3b94d46bc353246c95123b"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回客户端名称  <a href="class_server.html#a97d9351a4f3b94d46bc353246c95123b">更多...</a><br /></td></tr>
<tr class="separator:a97d9351a4f3b94d46bc353246c95123b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab44f4c14260fc07f2497fa270e7b45f2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ab44f4c14260fc07f2497fa270e7b45f2">Post</a> (<a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>(*complete)(void *), void *invoker)</td></tr>
<tr class="memdesc:ab44f4c14260fc07f2497fa270e7b45f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">投递一个用户操作  <a href="class_server.html#ab44f4c14260fc07f2497fa270e7b45f2">更多...</a><br /></td></tr>
<tr class="separator:ab44f4c14260fc07f2497fa270e7b45f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_service"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_service')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="class_service.html">Service</a></td></tr>
<tr class="memitem:ae3887d7d725c94f207a479a10cce30bd inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ae3887d7d725c94f207a479a10cce30bd">Service</a> ()</td></tr>
<tr class="separator:ae3887d7d725c94f207a479a10cce30bd inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6c3577b59652ac817d1d76aaccee904 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#af6c3577b59652ac817d1d76aaccee904">~Service</a> ()</td></tr>
<tr class="separator:af6c3577b59652ac817d1d76aaccee904 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05c507629c3614ccbe433ea89fd0f985 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a05c507629c3614ccbe433ea89fd0f985">IsServer</a> () const</td></tr>
<tr class="memdesc:a05c507629c3614ccbe433ea89fd0f985 inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回是否为服务端的标志  <a href="class_service.html#a05c507629c3614ccbe433ea89fd0f985">更多...</a><br /></td></tr>
<tr class="separator:a05c507629c3614ccbe433ea89fd0f985 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94ef51dae18339e99ea55a67c3b00451 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a94ef51dae18339e99ea55a67c3b00451">IsExistClient</a> (const std::string &amp;iden) const</td></tr>
<tr class="memdesc:a94ef51dae18339e99ea55a67c3b00451 inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过id, 查找客户端是否存在  <a href="class_service.html#a94ef51dae18339e99ea55a67c3b00451">更多...</a><br /></td></tr>
<tr class="separator:a94ef51dae18339e99ea55a67c3b00451 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87a64eeb17b61e794c1651d2de93f49b inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a87a64eeb17b61e794c1651d2de93f49b">IsServiceFlag</a> (const std::string &amp;iden) const</td></tr>
<tr class="memdesc:a87a64eeb17b61e794c1651d2de93f49b inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过客户端标志判断服务标志是否为此服务  <a href="class_service.html#a87a64eeb17b61e794c1651d2de93f49b">更多...</a><br /></td></tr>
<tr class="separator:a87a64eeb17b61e794c1651d2de93f49b inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4f45cb83a28907849da7897f7a30016 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ab4f45cb83a28907849da7897f7a30016">GetSize</a> () const</td></tr>
<tr class="memdesc:ab4f45cb83a28907849da7897f7a30016 inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取客户端大小  <a href="class_service.html#ab4f45cb83a28907849da7897f7a30016">更多...</a><br /></td></tr>
<tr class="separator:ab4f45cb83a28907849da7897f7a30016 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aede679dc4ce20dbe8fc56d9998727ef5 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#aede679dc4ce20dbe8fc56d9998727ef5">SetServiceFlag</a> (const std::string &amp;flag)</td></tr>
<tr class="memdesc:aede679dc4ce20dbe8fc56d9998727ef5 inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置服务标志,只能为数字或者字母  <a href="class_service.html#aede679dc4ce20dbe8fc56d9998727ef5">更多...</a><br /></td></tr>
<tr class="separator:aede679dc4ce20dbe8fc56d9998727ef5 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae091318f2a5a2708d1631670e8bce6c0 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ae091318f2a5a2708d1631670e8bce6c0">GetServiceFlag</a> () const</td></tr>
<tr class="memdesc:ae091318f2a5a2708d1631670e8bce6c0 inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取服务标志  <a href="class_service.html#ae091318f2a5a2708d1631670e8bce6c0">更多...</a><br /></td></tr>
<tr class="separator:ae091318f2a5a2708d1631670e8bce6c0 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a040c5f1db96aad100bb713db069bc19e inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a040c5f1db96aad100bb713db069bc19e">GetClientIden</a> (<a class="el" href="class_client.html">Client</a> *c) const</td></tr>
<tr class="memdesc:a040c5f1db96aad100bb713db069bc19e inherit pub_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">生成客户端标志  <a href="class_service.html#a040c5f1db96aad100bb713db069bc19e">更多...</a><br /></td></tr>
<tr class="separator:a040c5f1db96aad100bb713db069bc19e inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:afec0f8da7ecb6830cb903b87be79c26f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#afec0f8da7ecb6830cb903b87be79c26f">DealConnect</a> (<a class="el" href="class_client.html">Client</a> *c, const char *msg, void *invoker)</td></tr>
<tr class="memdesc:afec0f8da7ecb6830cb903b87be79c26f"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理接收函数，子类可重写此处理  <a href="class_server.html#afec0f8da7ecb6830cb903b87be79c26f">更多...</a><br /></td></tr>
<tr class="separator:afec0f8da7ecb6830cb903b87be79c26f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac43591a38a0fad67544d6b09d2604f29"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ac43591a38a0fad67544d6b09d2604f29">SetSocketOpt</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> *s)</td></tr>
<tr class="memdesc:ac43591a38a0fad67544d6b09d2604f29"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置套接字额外选项  <a href="class_server.html#ac43591a38a0fad67544d6b09d2604f29">更多...</a><br /></td></tr>
<tr class="separator:ac43591a38a0fad67544d6b09d2604f29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab42588a62599114c6eee2ca37b4b87d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ab42588a62599114c6eee2ca37b4b87d3">SetClient</a> (<a class="el" href="class_client.html">Client</a> *c)</td></tr>
<tr class="separator:ab42588a62599114c6eee2ca37b4b87d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad78813f16751c1047796440e1c25e455"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ad78813f16751c1047796440e1c25e455">PostAccept</a> (void *invoker)</td></tr>
<tr class="separator:ad78813f16751c1047796440e1c25e455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af419749ec5a94748acbbaf4f8d9163f1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_c_basic_service.html">CBasicService</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#af419749ec5a94748acbbaf4f8d9163f1">GetTcpService</a> () const</td></tr>
<tr class="memdesc:af419749ec5a94748acbbaf4f8d9163f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取tcp底层类指针  <a href="class_server.html#af419749ec5a94748acbbaf4f8d9163f1">更多...</a><br /></td></tr>
<tr class="separator:af419749ec5a94748acbbaf4f8d9163f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_service"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_service')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="class_service.html">Service</a></td></tr>
<tr class="memitem:aceb078ac7bb78b45f21e0a3d2bf79735 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#aceb078ac7bb78b45f21e0a3d2bf79735">AddClient</a> (const <a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_client.html">Client</a> &gt; &amp;c)</td></tr>
<tr class="memdesc:aceb078ac7bb78b45f21e0a3d2bf79735 inherit pro_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加客户端  <a href="class_service.html#aceb078ac7bb78b45f21e0a3d2bf79735">更多...</a><br /></td></tr>
<tr class="separator:aceb078ac7bb78b45f21e0a3d2bf79735 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cac6e8d20e95f043d56d83e3ddd33bc inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a3cac6e8d20e95f043d56d83e3ddd33bc">DeleteClient</a> (<a class="el" href="_sock_tools_8h.html#ac7875a7f6984241a06892f7041b4d30a">SOCKIDEN</a> id)</td></tr>
<tr class="memdesc:a3cac6e8d20e95f043d56d83e3ddd33bc inherit pro_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">删除客户端  <a href="class_service.html#a3cac6e8d20e95f043d56d83e3ddd33bc">更多...</a><br /></td></tr>
<tr class="separator:a3cac6e8d20e95f043d56d83e3ddd33bc inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f2080b05bc4a1a5642b7fba69d7f0d2 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a1f2080b05bc4a1a5642b7fba69d7f0d2">PopClient</a> (<a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_client.html">Client</a> &gt; &amp;c)</td></tr>
<tr class="memdesc:a1f2080b05bc4a1a5642b7fba69d7f0d2 inherit pro_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个客户端  <a href="class_service.html#a1f2080b05bc4a1a5642b7fba69d7f0d2">更多...</a><br /></td></tr>
<tr class="separator:a1f2080b05bc4a1a5642b7fba69d7f0d2 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26b720587403b9fe88c7b122ebab3553 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a26b720587403b9fe88c7b122ebab3553">Clear</a> ()</td></tr>
<tr class="memdesc:a26b720587403b9fe88c7b122ebab3553 inherit pro_methods_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">清空所有客户端  <a href="class_service.html#a26b720587403b9fe88c7b122ebab3553">更多...</a><br /></td></tr>
<tr class="separator:a26b720587403b9fe88c7b122ebab3553 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e6b17fa4ed3d5582a4d5bc8e6da4f4 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top"><a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a36e6b17fa4ed3d5582a4d5bc8e6da4f4">DeleteClient</a> (void *invoker)</td></tr>
<tr class="separator:a36e6b17fa4ed3d5582a4d5bc8e6da4f4 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
静态 Protected 成员函数</h2></td></tr>
<tr class="memitem:aab992aaa50dc9378ca89d42d3567ca52"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#aab992aaa50dc9378ca89d42d3567ca52">AcceptComplete</a> (<a class="el" href="class_c_sock_error.html">CSockError</a> ec, void *invoker)</td></tr>
<tr class="separator:aab992aaa50dc9378ca89d42d3567ca52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_static_methods_class_service"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_class_service')"><img src="closed.png" alt="-"/>&#160;静态 Protected 成员函数 继承自 <a class="el" href="class_service.html">Service</a></td></tr>
<tr class="memitem:a46eb93cf78fbfeed368634a90d9775d9 inherit pro_static_methods_class_service"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a46eb93cf78fbfeed368634a90d9775d9">DeleteNullClient</a> (<a class="el" href="class_client.html">Client</a> *c)</td></tr>
<tr class="separator:a46eb93cf78fbfeed368634a90d9775d9 inherit pro_static_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:ac27a342724c595745fea924a5ec116c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_c_tcp_io_server.html">CTcpIoServer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ac27a342724c595745fea924a5ec116c6">_tcpServer</a></td></tr>
<tr class="memdesc:ac27a342724c595745fea924a5ec116c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">tcp服务类  <a href="class_server.html#ac27a342724c595745fea924a5ec116c6">更多...</a><br /></td></tr>
<tr class="separator:ac27a342724c595745fea924a5ec116c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae87994e288d29da1f351d80ed04f387b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#ae87994e288d29da1f351d80ed04f387b">_svrSock</a></td></tr>
<tr class="memdesc:ae87994e288d29da1f351d80ed04f387b"><td class="mdescLeft">&#160;</td><td class="mdescRight">服务套接字  <a href="class_server.html#ae87994e288d29da1f351d80ed04f387b">更多...</a><br /></td></tr>
<tr class="separator:ae87994e288d29da1f351d80ed04f387b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_service"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_service')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="class_service.html">Service</a></td></tr>
<tr class="memitem:a307f7bf977f0a39c8675fb42bc204e36 inherit pro_attribs_class_service"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_string_imp_8h.html#a2024a29cf6ecb0ef87f0bc2ef277a7e9">StringImp</a>&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a307f7bf977f0a39c8675fb42bc204e36">_serviceFlag</a></td></tr>
<tr class="memdesc:a307f7bf977f0a39c8675fb42bc204e36 inherit pro_attribs_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">服务前缀标志  <a href="class_service.html#a307f7bf977f0a39c8675fb42bc204e36">更多...</a><br /></td></tr>
<tr class="separator:a307f7bf977f0a39c8675fb42bc204e36 inherit pro_attribs_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac215518825547a80c089e9166d4f5e72 inherit pro_attribs_class_service"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_tcp_config.html">TcpConfig</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ac215518825547a80c089e9166d4f5e72">_config</a></td></tr>
<tr class="memdesc:ac215518825547a80c089e9166d4f5e72 inherit pro_attribs_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">配置文件  <a href="class_service.html#ac215518825547a80c089e9166d4f5e72">更多...</a><br /></td></tr>
<tr class="separator:ac215518825547a80c089e9166d4f5e72 inherit pro_attribs_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5155a095380842a32c022fe9c9854ffd inherit pro_attribs_class_service"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_safe_map.html">CSafeMap</a>&lt; <a class="el" href="_sock_tools_8h.html#ac7875a7f6984241a06892f7041b4d30a">SOCKIDEN</a>, <a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_client.html">Client</a> &gt; &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a5155a095380842a32c022fe9c9854ffd">_mgr</a></td></tr>
<tr class="memdesc:a5155a095380842a32c022fe9c9854ffd inherit pro_attribs_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">客户端管理  <a href="class_service.html#a5155a095380842a32c022fe9c9854ffd">更多...</a><br /></td></tr>
<tr class="separator:a5155a095380842a32c022fe9c9854ffd inherit pro_attribs_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83c9735b06c1d6bd177cb0b8d04ce038 inherit pro_attribs_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a83c9735b06c1d6bd177cb0b8d04ce038">_isServer</a></td></tr>
<tr class="memdesc:a83c9735b06c1d6bd177cb0b8d04ce038 inherit pro_attribs_class_service"><td class="mdescLeft">&#160;</td><td class="mdescRight">服务端标志  <a href="class_service.html#a83c9735b06c1d6bd177cb0b8d04ce038">更多...</a><br /></td></tr>
<tr class="separator:a83c9735b06c1d6bd177cb0b8d04ce038 inherit pro_attribs_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:a8cb9983a2539a3243fcee562969b3235"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_server.html#a8cb9983a2539a3243fcee562969b3235">delete_class_copy_operator</a> (<a class="el" href="class_server.html">Server</a>)</td></tr>
<tr class="separator:a8cb9983a2539a3243fcee562969b3235"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock">
<p class="definition">在文件 <a class="el" href="_server_8h_source.html">Server.h</a> 第 <a class="el" href="_server_8h_source.html#l00013">13</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a64c508254f64bafca731b8758332bb04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64c508254f64bafca731b8758332bb04">&#9670;&nbsp;</a></span>Server()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a> Server::Server </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00013">13</a> 行定义.</p>

</div>
</div>
<a id="a4b3aa2579cb1c8cd1d069582c14d0fa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b3aa2579cb1c8cd1d069582c14d0fa6">&#9670;&nbsp;</a></span>~Server()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Server::~Server </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00018">18</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="aab992aaa50dc9378ca89d42d3567ca52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab992aaa50dc9378ca89d42d3567ca52">&#9670;&nbsp;</a></span>AcceptComplete()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> Server::AcceptComplete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td>
          <td class="paramname"><em>ec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00071">71</a> 行定义.</p>

</div>
</div>
<a id="afec0f8da7ecb6830cb903b87be79c26f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afec0f8da7ecb6830cb903b87be79c26f">&#9670;&nbsp;</a></span>DealConnect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a> Server::DealConnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_client.html">Client</a> *&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>处理接收函数，子类可重写此处理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>接收的客户端 </td></tr>
    <tr><td class="paramname">msg</td><td>若发生错误则msg返回错误信息，返回nullptr则成功 </td></tr>
    <tr><td class="paramname">invoker</td><td>上层用户传入的数据指针 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回0则继续投递接收，如果返回非0值则不再投递 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>发生错误时,c被置为nullptr,若成功则为客户端类指针 此函数将会先后调用Client::SetSocketOpt <a class="el" href="class_client.html#a95dc32ad76a8bde7a525408d03b842ed" title="开始任务，继承者可实现此函数进行处理">Client::Start</a> Client::SetTimeout； 只有config下设置了超时值时才会调用Client::SetTimeout </dd></dl>

<p>实现了 <a class="el" href="class_service.html#acad19cb7557fac6e504af4fb5c734d4e">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00125">125</a> 行定义.</p>

</div>
</div>
<a id="a8cb9983a2539a3243fcee562969b3235"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8cb9983a2539a3243fcee562969b3235">&#9670;&nbsp;</a></span>delete_class_copy_operator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Server::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_server.html">Server</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a97d9351a4f3b94d46bc353246c95123b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97d9351a4f3b94d46bc353246c95123b">&#9670;&nbsp;</a></span>GetName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* Server::GetName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回客户端名称 </p>

<p>实现了 <a class="el" href="class_service.html#a632a3bcb74f8fc331d37e55c50951d83">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8h_source.html">Server.h</a> 第 <a class="el" href="_server_8h_source.html#l00041">41</a> 行定义.</p>

</div>
</div>
<a id="af419749ec5a94748acbbaf4f8d9163f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af419749ec5a94748acbbaf4f8d9163f1">&#9670;&nbsp;</a></span>GetTcpService()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_basic_service.html">CBasicService</a> * Server::GetTcpService </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取tcp底层类指针 </p>

<p>实现了 <a class="el" href="class_service.html#a9ea329d8d3607adcd3e03a94a0585217">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00106">106</a> 行定义.</p>

</div>
</div>
<a id="a06de0cc7252d197cbf6f1fdb6887d6c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06de0cc7252d197cbf6f1fdb6887d6c1">&#9670;&nbsp;</a></span>Init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Server::Init </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_tcp_config.html">TcpConfig</a> &amp;&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化服务,主要用于绑定监听一个地址端口 </p>

<p>实现了 <a class="el" href="class_service.html#a2d41738423a6eafacc44af90ca6c6ef7">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00024">24</a> 行定义.</p>

</div>
</div>
<a id="a2370cd5731a2c120dc705af3acbe46b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2370cd5731a2c120dc705af3acbe46b8">&#9670;&nbsp;</a></span>NotifyExit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Server::NotifyExit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知Run函数退出 </p>

<p>实现了 <a class="el" href="class_service.html#ae7f2c04b1f26bcb86e59beb2f7dcbeed">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00142">142</a> 行定义.</p>

</div>
</div>
<a id="ab44f4c14260fc07f2497fa270e7b45f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab44f4c14260fc07f2497fa270e7b45f2">&#9670;&nbsp;</a></span>Post()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Server::Post </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>(*)(void *)&#160;</td>
          <td class="paramname"><em>complete</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>投递一个用户操作 </p>

<p>实现了 <a class="el" href="class_service.html#a24501c6a89af8f6781ef96b423644780">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00053">53</a> 行定义.</p>

</div>
</div>
<a id="ad78813f16751c1047796440e1c25e455"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad78813f16751c1047796440e1c25e455">&#9670;&nbsp;</a></span>PostAccept()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Server::PostAccept </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00111">111</a> 行定义.</p>

</div>
</div>
<a id="a3513ac8eb75dac27c81720b64aa9b761"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3513ac8eb75dac27c81720b64aa9b761">&#9670;&nbsp;</a></span>PostConnect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Server::PostConnect </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em> = <code><a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>addr</em> = <code><a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>&#160;</td>
          <td class="paramname"><em>port</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>投递一个接收请求，参数将会被忽略 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
    <tr><td class="paramname">addr</td><td>此参数忽略 </td></tr>
    <tr><td class="paramname">port</td><td>此参数忽略 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>备注</dt><dd>用户需要调用一次此函数才能开始工作， 此后DealConnect处理接连之后会自动调用投递函数; 用户也可以重写DealConnect函数以便实现自己的逻辑 </dd></dl>

<p>实现了 <a class="el" href="class_service.html#a7f9f9d3c3033b32ce108509093a7ff08">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00058">58</a> 行定义.</p>

</div>
</div>
<a id="a7c31d308dd9b23132e9912352696ac26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c31d308dd9b23132e9912352696ac26">&#9670;&nbsp;</a></span>Run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Server::Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行服务 </p>

<p>实现了 <a class="el" href="class_service.html#aad0c7b096b5dc39a0a763997f045c2d5">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00137">137</a> 行定义.</p>

</div>
</div>
<a id="ab42588a62599114c6eee2ca37b4b87d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab42588a62599114c6eee2ca37b4b87d3">&#9670;&nbsp;</a></span>SetClient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Server::SetClient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_client.html">Client</a> *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_server_8cpp_source.html">Server.cpp</a> 第 <a class="el" href="_server_8cpp_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<a id="ac43591a38a0fad67544d6b09d2604f29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac43591a38a0fad67544d6b09d2604f29">&#9670;&nbsp;</a></span>SetSocketOpt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Server::SetSocketOpt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置套接字额外选项 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>受监听套接字设置选项函数，子类可继承重写此函数以设置socket的特殊选项 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true，失败返回false </dd></dl>

<p>实现了 <a class="el" href="class_service.html#a3a7a13a861535967242b96661e0b75ba">Service</a>.</p>

<p class="definition">在文件 <a class="el" href="_server_8h_source.html">Server.h</a> 第 <a class="el" href="_server_8h_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="ae87994e288d29da1f351d80ed04f387b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae87994e288d29da1f351d80ed04f387b">&#9670;&nbsp;</a></span>_svrSock</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&gt; Server::_svrSock</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>服务套接字 </p>

<p class="definition">在文件 <a class="el" href="_server_8h_source.html">Server.h</a> 第 <a class="el" href="_server_8h_source.html#l00072">72</a> 行定义.</p>

</div>
</div>
<a id="ac27a342724c595745fea924a5ec116c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac27a342724c595745fea924a5ec116c6">&#9670;&nbsp;</a></span>_tcpServer</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="class_c_tcp_io_server.html">CTcpIoServer</a>&gt; Server::_tcpServer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>tcp服务类 </p>

<p class="definition">在文件 <a class="el" href="_server_8h_source.html">Server.h</a> 第 <a class="el" href="_server_8h_source.html#l00071">71</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/framework/tcp/framework/<a class="el" href="_server_8h_source.html">Server.h</a></li>
<li>H:/project/LibTools/src/framework/tcp/framework/<a class="el" href="_server_8cpp_source.html">Server.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
